DragAlignedWindow
TheDragAlignedWindow
function drags the specified window along an optimal alignment grid.
pascal void DragAlignedWindow (WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, AlignmentProcRecordPtr alignmentProc);
wp
- Contains a window pointer to the window to be dragged.
startPt
- Specifies a point that is equal to the point where the mouse button was pressed (in global coordinates, as stored in the
where
field of the event structure).DragAlignedWindow
pulls a gray outline of the window around the screen, following the movements of the mouse until the button is released.boundsRect
- Points to the boundary rectangle in global coordinates. If the mouse button is released when the mouse position is outside the limits of the boundary rectangle,
DragAlignedWindow
returns without moving the window or making it the active window. For a document window,
the boundary rectangle typically is four pixels in from the menu bar and from the other edges of the screen, to ensure that there won't be less than a four-pixel-square area of the title bar visible on the screen.alignmentRect
- Points to a rectangle in window coordinates that allows you to align the window to a rectangle within the window. Set this parameter to
nil
to align using the bounds of the window.alignmentProc
- Allows you to provide your own alignment behavior. Set this parameter to
nil
to use the standard alignment behavior. Your alignment function must be in the following form:pascal void MyAlignmentProc (Rect *rp, long refcon);
See "Alignment Functions" on page 3-149 for details.SEE ALSO
TheDragAlignedWindow
is similar to the Window Manager'sDragWindow
routine. See Inside Macintosh: Macintosh ToolBox Essentials Essentials for details onDragWindow
.